package com.sk.sourcecircle.dialog;

import android.view.View;

import com.sk.sourcecircle.R;
import com.sk.sourcecircle.activity.mine.act.MySettingsActivity;
import com.sk.sourcecircle.base.BaseDialogFragment;

import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * Created by sk on 2017/12/28.
 */

public class SexDialogFragment extends BaseDialogFragment {
    Unbinder unbinder;

    @Override
    protected int getContentView() {
        return R.layout.dialog_choose_sex;
    }

    @OnClick({R.id.male, R.id.female})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.male:
                dismiss();
                if(getActivity() instanceof MySettingsActivity){
                    ((MySettingsActivity) getActivity()).setSex(0);
                }
                break;
            case R.id.female:
                dismiss();
                if(getActivity() instanceof MySettingsActivity){
                    ((MySettingsActivity) getActivity()).setSex(1);
                }
                break;
        }
    }
}
